#使用xpath定位元素
from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.get("https://www.baidu.com/")
driver.find_element_by_xpath("//*[@id='kw']").send_keys("刘亦菲")
driver.find_element_by_xpath("//*[@id='su']").click()
time.sleep(2)
driver.quit()


